package com.neu.credit.creditscore.entity.books;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@TableName("book_borrowings")
@Schema(name = "BookBorrowings", description = "图书借阅子记录表")
public class BookBorrowings {

    //预下单
    public final static int STATUS_PRE = 0;
    //借阅中
    public final static int STATUS_USING = 1;
    //已归还
    public final static int STATUS_USED = 2;
    //以逾期
    public final static int STATUS_OVERDUE = 3;
    @Schema(description = "借阅ID，自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "借阅日期")
    private Date borrowDate;

    @Schema(description = "应还日期")
    private Date dueDate;

    @Schema(description = "实际归还日期（NULL表示未归还）")
    private Date returnDate;

    @Schema(description = "借阅状态0-预下单， 1-借阅中， 2-已归还")
    private int borrowingStatus;

    @Schema(description = "创建时间")
    private Date createdAt;

    @Schema(description = "更新时间")
    private Date updatedAt;

}